package cn.wolfcode.luowowo.acticle.service;

import cn.wolfcode.luowowo.acticle.domain.Answer;
import cn.wolfcode.luowowo.acticle.domain.AnswerContent;
import cn.wolfcode.luowowo.acticle.query.AnswerQuery;
import cn.wolfcode.luowowo.acticle.vo.AnswerStatisVO;
import cn.wolfcode.luowowo.acticle.vo.UserCommentVO;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface IAnswerService {

    /**
     * 查问题被顶最多的回答
     * @param id 问题id
     * @return
     */
    Answer getAnswerByThumbupnum(Long id);

    /**
     * 回答分页
     * @param id
     * @return
     */
    PageInfo getAnswerByqo(AnswerQuery qo);

    /**
     * 回答的内容
     * @param id
     * @return
     */
    AnswerContent getContentByAnswer(Long id);

    /**
     * 添加回答
     * @param answer
     */
    void saveAnswer(Answer answer);

    /**
     * 查询单个回答
     * @param aid
     * @return
     */
    Answer get(Long aid);

    /**
     * 根据vo对象更新统计信息
     * @param vo1
     */
    void updateStatisByVo(AnswerStatisVO vo1);

    /**
     * 查所有的回答
     * @return
     */
    List<Answer> list();


}
